package demo10.ArrayMethodReference;

import java.util.Arrays;

public class Demo {
    public static void printArray(int len,ArrayBuilder ab){
        int[] array = ab.BuildArray(len);
        System.out.println(Arrays.toString(array));
    }

    public static void main(String[] args) {
//        printArray(5,len -> new int[len]);
        printArray(5,int[]::new);
    }
}
